package com.hb.core.pojo.project.opening.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hb.core.pojo.Attachments;
import com.hb.core.pojo.parent.MPCommonEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 开标标段记录表
 * </p>
 *
 * @author admin
 * @since 2021-11-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("trade_opening_bid_info")
@ApiModel(value = "OpeningBidInfo对象", description = "开标标段记录表")
public class OpeningBidInfo extends MPCommonEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "开标设置ID")
    private Long openingSetId;

    @ApiModelProperty(value = "招标文件ID")
    private Long fileId;

    @ApiModelProperty(value = "标段ID")
    private Long sectionId;

    @ApiModelProperty(value = "开标时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime openBidTime;

    @ApiModelProperty(value = "状态(0:未开标 1:签到 2:开标 3:解密 4:解密结束 5:唱标 6:确认 7:结束 8:流标)")
    private Integer status;

    @ApiModelProperty(value = "是否开始开标(0:未开始 1:已开始)")
    private Integer isStart;

    @ApiModelProperty(value = "是否结束签名(1:未结束 2:已结束)")
    private Integer isEndSign;

    @ApiModelProperty(value = "开第几信封(1:第一信封 2:第二信封)")
    private Integer envelopeSort;

    @ApiModelProperty(value = "递交标书数量")
    private Integer bidSubmitCount;

    @ApiModelProperty(value = "是否可以开标(0:不可开标 1:可开标)")
    private Integer isCanOpen;

    @ApiModelProperty(value = "解密开始时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  decryptStartTime;

    @ApiModelProperty(value = "解密结束时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  decryptEndTime;

    @ApiModelProperty(value = "是否可以评标(0:不可评标 1:第一信封可评 2:第二信封可评)")
    private Integer isCanBidEvaluation;

    @ApiModelProperty(value = "是否双信封(1:单信封 2:双信封)")
    private Integer isTwoEnvelope;

    @ApiModelProperty(value = "抽取系数")
    private BigDecimal coefficient;

    @ApiModelProperty(value = "开标一览表内容")
    private Attachments bidOpeningSchedule;

    @ApiModelProperty(value = "投标人确认(签名)方式:(1:确认 2:签章)")
    private Integer signWay;

    @ApiModelProperty(value = "签名开始时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  signStartTime;

    @ApiModelProperty(value = "签名结束时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  signEndTime;

    @ApiModelProperty(value = "是否隐藏报价（1，需隐藏（实际情况根据开标设置来），2，不隐藏（生成开标一览表，强制不隐藏），3，唱标（代理机构也隐藏））")
    @TableField(exist = false)
    private Integer noShow;

    @ApiModelProperty(value = "流标原因")
    private String flowReason;
}
